<include file="public@header" />
</head>
<body>
    <div class="layui-fluid js-check-wrap">
        <div class="layui-card">
            <div class="layui-card-header well">
                <div class="layui-col-xs6">
                    <h3>{:lang('ADMIN_RBAC_INDEX')}</h3>
                </div>
                <div class="layui-col-xs6 text-right">
                    <!-- 添加分类 -->
                    <a href="{:url('rbac/roleAdd')}" class="layui-btn layui-btn-normal">{:lang('ADMIN_RBAC_ROLEADD')}</a>
                </div>
            </div>

            <form action="{:url('Rbac/listorders')}" method="post" class="margin-top-20">
                <div class="layui-card-body">
                    <table class="layui-table">
                        <thead>
                            <tr>
                                <th width="40">ID</th>
                                <th align="left">{:lang('ROLE_NAME')}</th>
                                <th align="left">{:lang('ROLE_DESCRIPTION')}</th>
                                <th width="60" align="left">{:lang('STATUS')}</th>
                                <th width="252">{:lang('ACTIONS')}</th>
                            </tr>
                        </thead>
                        <tbody>
                            <foreach name="roles" item="vo">
                            <tr>
                                <td>{$vo.id}</td>
                                <td>{$vo.name}</td>
                                <td>{$vo.remark}</td>
                                <td>
                                    <if condition="$vo['status'] eq 1">
                                        <font color="red">√</font>
                                    <else /> 
                                        <font color="red">╳</font>
                                    </if>
                                </td>
                                <td>
                                    <if condition="$vo['id'] eq 1">
                                        <button class="layui-btn layui-btn-disabled layui-btn-xs">{:lang('ROLE_SETTING')}</button>  <!-- <a href="javascript:openIframeDialog('{:url('rbac/member',array('id'=>$vo['id']))}','成员管理');">成员管理</a> | -->
                                        <button class="layui-btn layui-btn-disabled layui-btn-xs">栏目权限</button>
                                        <button class="layui-btn layui-btn-disabled layui-btn-xs">{:lang('EDIT')}</button>
                                        <button class="layui-btn layui-btn-disabled layui-btn-xs">{:lang('DELETE')}</button>
                                    <else />
                                        <if condition="in_array('authorize',$actions)">
                                            <a class="layui-btn layui-btn-warm layui-btn-xs" href="{:url('Rbac/authorize',array('id'=>$vo['id']))}">{:lang('ROLE_SETTING')}</a>
                                        </if>
                                        <if condition="in_array('catpriv',$actions)">
                                            <!-- <a href="{:url('Rbac/catpriv',array('id'=>$vo['id']))}">栏目权限</a> -->
                                            <!-- <a class="layui-btn layui-btn-normal layui-btn-xs" href="javascript:openIframeDialog('{:url('Rbac/catpriv',array('id'=>$vo['id']))}','栏目权限《{$vo.name}》',{width:'992px',height:'620px'});">栏目权限</a> -->
                                            <!-- <a class="layui-btn layui-btn-normal layui-btn-xs" href="javascript:parent.openIframeLayer('{:url('Rbac/catpriv',array('id'=>$vo['id']))}','栏目权限《{$vo.name}》',{area:['992px', '653px']});">栏目权限</a> -->
                                        </if>
                                        <!-- <a href="javascript:openIframeDialog('{:url('rbac/member',array('id'=>$vo['id']))}','成员管理');">成员管理</a>| -->
                                        <if condition="in_array('roleEdit',$actions)">
                                            <a class="layui-btn layui-btn-xs" href="{:url('Rbac/roleedit',array('id'=>$vo['id']))}">{:lang('EDIT')}</a>
                                        </if>
                                        <if condition="in_array('roleDelete',$actions)">
                                            <a class="js-ajax-delete layui-btn layui-btn-danger layui-btn-xs" href="{:url('Rbac/roledelete',array('id'=>$vo['id']))}">{:lang('DELETE')}</a>
                                        </if>
                                    </if>
                                </td>
                            </tr>
                            </foreach>
                        </tbody>
                    </table>
                </div>
            </form>
        </div>
    </div>
<include file="public@footer"/>
